package com.woniu.service.sportsHealth.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import com.woniu.mapper.sportsHealth.BloodTemperatureMapper;
import com.woniu.model.sportsHealth.entity.BloodTemperature;
import com.woniu.model.sportsHealth.model.dto.BloodTemperatureDto;
import com.woniu.model.sportsHealth.model.vo.BloodTemperatureVo;
import com.woniu.service.sportsHealth.IBloodTemperatureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 体温表 服务实现类
 * </p>
 *
 * @author Jet
 * @since 2023-10-23
 */
@Service
public class BloodTemperatureServiceImpl extends ServiceImpl<BloodTemperatureMapper, BloodTemperature> implements IBloodTemperatureService {

    @Autowired
    BloodTemperatureMapper bloodTemperatureMapper;
    @Override
    public PageInfo<BloodTemperatureDto> findAll(Map<String, Object> param, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<BloodTemperatureDto> temperatureDtoList = bloodTemperatureMapper.findAll(param);
        PageInfo<BloodTemperatureDto> pageInfo = new PageInfo<>(temperatureDtoList);
        return pageInfo;
    }

    @Override
    public List<BloodTemperatureVo> findAllExport() {
        List<BloodTemperatureVo> allExport = bloodTemperatureMapper.findAllExport();
        return allExport;
    }
}
